// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package data_report

import (
	"flag"
	"testing"

	"code.geniusai.org/notebook-manager/pkg/config"
	"code.geniusai.org/notebook-manager/pkg/entity"
	"code.geniusai.org/notebook-manager/pkg/log"
)

func TestReport(t *testing.T) {
	// 上报数据
	var conf string
	flag.StringVar(&conf, "conf", "../../../pkg/config/application.yaml", "-conf /application.yaml")
	flag.Parse()
	log.Init()

	confData := config.LoadConf(conf)
	notebook := &entity.Notebook{}
	notebook.ProjectID = "xmz37680-p-1"
	notebook.UserID = "xmz37680"
	notebook.Name = "notebook"
	DataReportMsg(notebook, confData, entity.NbActionCreate)
}
